using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Workspace
{
    /// <summary>
    /// <para>Import XML Workspace Document</para>
    /// <para>Imports the contents of an XML workspace document into an existing geodatabase.</para>
    /// <para>将 XML 工作空间文档的内容导入到现有地理数据库中。</para>
    /// </summary>    
    [DisplayName("Import XML Workspace Document")]
    public class ImportXMLWorkspaceDocument : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ImportXMLWorkspaceDocument()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_target_geodatabase">
        /// <para>Target Geodatabase</para>
        /// <para>The existing geodatabase where the contents of the XML workspace document will be imported.</para>
        /// <para>将导入 XML 工作空间文档内容的现有地理数据库。</para>
        /// </param>
        /// <param name="_in_file">
        /// <para>Import File</para>
        /// <para>The input XML workspace document file containing geodatabase contents to be imported. This can be an XML file (.xml) or a compressed ZIP file (.zip or .z) containing the XML file.</para>
        /// <para>包含要导入的地理数据库内容的输入 XML 工作空间文档文件。这可以是包含 XML 文件的 XML 文件 （.xml） 或压缩的 ZIP 文件（.zip 或 .z）。</para>
        /// </param>
        public ImportXMLWorkspaceDocument(object _target_geodatabase, object _in_file)
        {
            this._target_geodatabase = _target_geodatabase;
            this._in_file = _in_file;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Import XML Workspace Document";

        public override string CallName => "management.ImportXMLWorkspaceDocument";

        public override List<string> AcceptEnvironments => ["scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_target_geodatabase, _in_file, _import_type.GetGPValue(), _config_keyword, _out_geodatabase];

        /// <summary>
        /// <para>Target Geodatabase</para>
        /// <para>The existing geodatabase where the contents of the XML workspace document will be imported.</para>
        /// <para>将导入 XML 工作空间文档内容的现有地理数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Target Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _target_geodatabase { get; set; }


        /// <summary>
        /// <para>Import File</para>
        /// <para>The input XML workspace document file containing geodatabase contents to be imported. This can be an XML file (.xml) or a compressed ZIP file (.zip or .z) containing the XML file.</para>
        /// <para>包含要导入的地理数据库内容的输入 XML 工作空间文档文件。这可以是包含 XML 文件的 XML 文件 （.xml） 或压缩的 ZIP 文件（.zip 或 .z）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Import File")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_file { get; set; }


        /// <summary>
        /// <para>Import Options</para>
        /// <para><xdoc>
        ///   <para>Determines if both data (feature class and table records, including geometry) and schema are imported, or only schema is imported.</para>
        ///   <bulletList>
        ///     <bullet_item>Import data and schema—Import the data and schema. This is the default.</bullet_item><para/>
        ///     <bullet_item>Import schema only—Import the schema only.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是同时导入数据（要素类和表记录，包括几何）和方案，还是仅导入方案。</para>
        ///   <bulletList>
        ///     <bullet_item>导入数据和方案 - 导入数据和方案。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>仅导入方案 （Import schema only） - 仅导入方案。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Import Options")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _import_type_value _import_type { get; set; } = _import_type_value._DATA;

        public enum _import_type_value
        {
            /// <summary>
            /// <para>Import data and schema</para>
            /// <para>Import data and schema—Import the data and schema. This is the default.</para>
            /// <para>导入数据和方案 - 导入数据和方案。这是默认设置。</para>
            /// </summary>
            [Description("Import data and schema")]
            [GPEnumValue("DATA")]
            _DATA,

            /// <summary>
            /// <para>Import schema only</para>
            /// <para>Import schema only—Import the schema only.</para>
            /// <para>仅导入方案 （Import schema only） - 仅导入方案。</para>
            /// </summary>
            [Description("Import schema only")]
            [GPEnumValue("SCHEMA_ONLY")]
            _SCHEMA_ONLY,

        }

        /// <summary>
        /// <para>Configuration Keyword</para>
        /// <para>Geodatabase configuration keyword to be applied if the Target Geodatabase is an enterprise or file geodatabase.</para>
        /// <para>如果目标地理数据库是企业级地理数据库或文件级地理数据库，则要应用的地理数据库配置关键字。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Configuration Keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _config_keyword { get; set; } = null;


        /// <summary>
        /// <para>Updated Target Geodatabase</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Target Geodatabase")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_geodatabase { get; set; }


        public ImportXMLWorkspaceDocument SetEnv(object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}